from rest_framework.throttling import SimpleRateThrottle
from django.core.cache import cache as default_cache

class MyThrottle(SimpleRateThrottle):
    scope = "jk1"
    THROTTLE_RATES = {"jk1": "5/m"}
    cache = default_cache
    def get_cache_key(self, request, view):
        ident = self.get_ident(request)
        print(ident)
        return self.cache_format % {"scope":self.scope,"ident":ident}